package metalink.admin;

import java.util.ArrayList;

import model.admin.GetBatchListMo;
import model.admin.GetCourseListMo;

import vo.mixed.CourseListVo;
import vo.mixed.DepartmentListVo;
import vo.mixed.ProfessorListVo;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class GetDepartmentList extends ActionSupport {
	int department_id;
	int professor_id;
	ArrayList<DepartmentListVo> department_list;
	ArrayList<CourseListVo> department_course_list;
	ArrayList<CourseListVo> department_course_professor_list;
ArrayList<ProfessorListVo> professor_list;
	
	public int getProfessor_id() {
		return professor_id;
	}

	public void setProfessor_id(int professor_id) {
		this.professor_id = professor_id;
	}

	public ArrayList<CourseListVo> getDepartment_course_professor_list() {
		return department_course_professor_list;
	}

	public void setDepartment_course_professor_list(
			ArrayList<CourseListVo> department_course_professor_list) {
		this.department_course_professor_list = department_course_professor_list;
	}

	public ArrayList<CourseListVo> getDepartment_course_list() {
		return department_course_list;
	}

	public void setDepartment_course_list(
			ArrayList<CourseListVo> department_course_list) {
		this.department_course_list = department_course_list;
	}

	public ArrayList<DepartmentListVo> getDepartment_list() {
		return department_list;
	}

	public void setDepartment_list(ArrayList<DepartmentListVo> department_list) {
		this.department_list = department_list;
	}

	public int getDepartment_id() {
		return department_id;
	}

	public void setDepartment_id(int department_id) {
		this.department_id = department_id;
	}

	public int getCourse_id() {
		return professor_id;
	}

	public void setCourse_id(int course_id) {
		this.professor_id = course_id;
	}

	public ArrayList<ProfessorListVo> getProfessor_list() {
		return professor_list;
	}

	public void setProfessor_list(ArrayList<ProfessorListVo> professor_list) {
		this.professor_list = professor_list;
	}

	public String execute() throws Exception {
		GetBatchListMo department_obj = new GetBatchListMo();
		setDepartment_list(department_obj.getDepartmentList(0, 0));
		return SUCCESS;
	}

	public String getDepartmentCourseDetails() throws Exception {
		GetBatchListMo dept_course_obj = new GetBatchListMo();
		setDepartment_course_list(dept_course_obj.getBatchCourseList(0,
				department_id,0));
		return SUCCESS;
	}
public String getDepartmentCourseProfessorDetails(){
	GetCourseListMo dept_course_prof_obj = new GetCourseListMo();
setDepartment_course_professor_list(dept_course_prof_obj.getCourseList(professor_id));
	return SUCCESS;
}
public String getDepartmentProfessorDetails(){
	GetCourseListMo prof_list = new GetCourseListMo();
	professor_list=prof_list.getCourseProfessorDetails(0,department_id);
	return SUCCESS;
}
}
